<%--
  Created by IntelliJ IDEA.
  User: 13939
  Date: 2024/12/2
  Time: 9:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html>
<head>
  <%
    //检测用户是否已经登陆了
    String username  = (String) session.getAttribute("username");
    String hid = request.getParameter("hid");
    if(username==null){
      response.sendRedirect("/login/login.jsp");
      return;  //!!!!!不能少  返回  不执行下面的语句
    }
  %>
  <link rel="stylesheet" href="../styles/delete.css">
  <meta charset="UTF-8">
  <title>确认删除新闻</title>
</head>
<body>
<div class="container">
  <h1>确认删除新闻</h1>
  <p>您确定要删除这条新闻吗？此操作不可逆。</p>
  <form action="deleteNew.jsp?hid=<%=hid%>" method="post">
    <div class="mt-4">
      <button type="submit" class="btn btn-danger">确定删除</button>
      <a href="/show/show.jsp" class="btn btn-secondary">取消</a>
    </div>
  </form>

</div>
</body>
</html>